<?php

namespace App\Models\ModelFilters;

use EloquentFilter\ModelFilter;

class GoodsFilter extends ModelFilter
{
    public $relations = [];

    public function categoryId($categoryId)
    {
        return $this->where('goods.category_id', $categoryId);
    }

    public function goodsName($goodsName)
    {
        return $this->whereLike('goods.goods_name', $goodsName);
    }

    public function goodscode($goodscode)
    {
        return $this->whereLike('goods.goods_code', $goodscode);
    }
}

